﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace iTravel.Repository
{
    public interface IRepository<T>
        where T : class
    {
        IEnumerable<T> All();
        T Find(int id);
        T Find(int id, params Expression<Func<T, object>>[] includeProperties);
        IEnumerable<T> AllIncluding(params Expression<Func<T, object>>[] includeProperties);
        void InsertOrUpdate(T entity);
        void Delete(int id);
        void Delete(T entity);
    }
}